<template>
	<view class="doctor" v-for="(item,index) in searchedList" key="index">
		<img :src="item.avatar">
		<view class="dotor-box">
			<view class="name">{{item.name}}</view>
			<view class="title">{{item.title}}</view>
			<view class="goodat">{{item.goodAt}}</view>
		</view>
	</view>
	
</template>

<script>
	export default{
		data(){
			return{
				searchedList:'',
				
			}
		},
		onLoad(options){
			console.log(options.doctorname)
			uni.request({
				url:'http://192.168.36.46:3000/patient/finddoctor?value='+options.doctorname
			}).then(res=>{
				console.log(res.data.data)
				this.searchedList = res.data.data
			})
		},
		methods:{
			
		},
	}
</script>

<style lang="scss">
	.doctor{
		width: 100%;
		padding-left: 16px;
		padding-right: 16px;
		display: flex;
		box-sizing: border-box;
		margin: 20px 0px 20px 0px ;
		img{
			width: 57px;
			height: 78px;
			border-radius: 10px;
			margin-right: 13px;
		}
		.dotor-box{
			.name{
				font-size: 16px;
				font-weight: 700;
			}
			.title{
				margin: 10px 0px 10px 0px;
			}
			.goodat{
				font-size: 14px;
				display: -webkit-box;
				text-overflow: ellipsis;
				overflow: hidden;
				-webkit-box-orient: vertical;
				-webkit-line-clamp: 2;//当属性值为3，表示超出3行隐藏
			}
		}
		
	}
</style>